import { createApp } from 'vue';
/**
 * @method 样式重置
 */
import '@/assets/styles/index.less';

/* these are necessary styles for vue flow */
import '@vue-flow/core/dist/style.css';

/* this contains the default theme, these are optional styles */
import '@vue-flow/core/dist/theme-default.css';
/**
 * @method 状态管理
 */
// import { createPinia } from 'pinia';
/**
 * @method ui组件库（已实现按需导入，无需引入）
 */
// import ArcoVue from '@arco-design/web-vue';
// import '@arco-design/web-vue/dist/arco.css';
/**
 * @method 引入图标库
 */
// import ArcoVueIcon from '@arco-design/web-vue/es/icon';
import App from './App.vue';
/**
 * @method 引入路由
 */
/* 引入全局组件 */
import PageMain from '@/components/PageBox.vue';
import CommonTable from '@/components/CommonTable.vue';
import DownloadPdf  from "@/components/DownloadPdf.vue";
import router from './router';
/**
 * @method 引入全局自定义指令
 */
// import { hasPermissionDirective } from '@/util/directive';
import SeachInput from '@/components/input/SeachInput.vue';
import SelectInput from '@/components/input/SelectInput.vue';
import DateInput from '@/components/input/DateInput.vue';
import TextInput from '@/components/input/textInput.vue';
import RangePicker from '@/components/input/RangePicker.vue';
import YearDate from "@/components/input/YearDate.vue";
import CommonStep from "@/components/CommonStep.vue";
import FormCollapse from '@/components/FormCollapse.vue'

import { setupPermission } from "@/util/permission";


import { setupStore } from "@/stores";

const app = createApp(App);
// app.directive('auth', hasPermissionDirective); // 注册权限事件
// app.use(ArcoVue); （已实现按需导入，无需引入）
// app.use(ArcoVueIcon);
/* 注册全局组件 */
app.component('PageMain', PageMain);
app.component('CommonTable', CommonTable);
app.component('SeachInput', SeachInput);
app.component('SelectInput', SelectInput);
app.component('DateInput', DateInput);
app.component('TextInput', TextInput);
app.component('RangePicker', RangePicker);
app.component('DownloadPdf', DownloadPdf);
app.component('YearDate', YearDate);
app.component('CommonStep', CommonStep);
app.component('FormCollapse',FormCollapse)
// 全局注册状态管理
setupStore(app);
// 注册动态路由
setupPermission();
// app.use(createPinia());
// app.use(router);
app.use(router).mount("#app");
